import axios from 'axios'
const adminApi = {
    add(param){
        return axios.post('/system/api/admin/add',param)
    },
    update(param) {
        return axios.put('/system/api/admin/update', param)
    },

    deleteBatch(ids) {
        return axios.delete(`/system/api/admin/deleteBatch?ids=${ids}`)
    },

    selectList(param) {
        return axios.get('/system/api/admin/selectList', { params: param })
    },
    selectById(id) {
        return axios.get(`/system/api/admin/${id}`)
    },

    selectRolesByAdminId(id){
        return axios.get(`/system/api/role/selectRolesByAdminId/${id}`)
    },

    uploadAvatar(formData){
        return axios.post('/system/api/admin/uploadAvatar',formData,{
            headers: {
              'Content-Type': 'multipart/form-data',
            },
          })
    }
}

export default adminApi